export const openWindow = url => {
	const width = screen.availWidth - 10;
	const height = screen.availHeight - 50;
	let szFeatures = 'top=0,';
	szFeatures += 'left=0,';
	szFeatures += `width=${width},`;
	szFeatures += `height=${height},`;
	szFeatures += 'directories=no,';
	szFeatures += 'status=yes,toolbar=no,location=no,';
	szFeatures += 'menubar=no,';
	szFeatures += 'scrollbars=yes,';
	szFeatures += 'resizable=yes';
	window.open(url, '', szFeatures);
};

export const openWindowSingle = url => {
	const width = screen.availWidth - 10;
	const height = screen.availHeight - 50;
	let szFeatures = 'top=0,';
	szFeatures += 'left=0,';
	szFeatures += `width=${width},`;
	szFeatures += `height=${height},`;
	szFeatures += 'directories=no,';
	szFeatures += 'status=yes,toolbar=no,location=no,';
	szFeatures += 'menubar=no,';
	szFeatures += 'scrollbars=yes,';
	szFeatures += 'resizable=yes';
	window.open("/spa/crm/mobx/index.html#"+url, '', szFeatures);
};
	
window.openFullWindowHaveBarForCrm = openWindowSingle;
window.openFullWindowHaveBar = openWindow;
//window.hrefReportInfo =  (id) => {window.open("#/main/info/addReport?id="+id+"type="+type)};